Skip to content

[pat] API allows update which does not change any data #15108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Dec 1, 2022

Description

MySQL would return 0 RowsModified when the updated values already match. Here, we solve it by not checking for the udpated rows and instead rely on the Get to return the not found.

Related Issue(s)

Fixes #15105

How to test

Unit regression tests +

  1. Preview
  2. Create PAT
  3. Click edit PAT
  4. Make no changes to it, press click Update
  5. There's no Error.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@easyCZ easyCZ requested a review from a team December 1, 2022 14:06
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-mp-pat-fix-update-without-modifications.1 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat added the size/M label Dec 1, 2022
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Dec 1, 2022
@easyCZ easyCZ force-pushed the mp/pat-fix-update-without-modifications branch from c8470d5 to 87b0fae Compare December 1, 2022 14:15
Copy link
Member

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

200 OK

@roboquat roboquat merged commit e5dd023 into main Dec 1, 2022
@roboquat roboquat deleted the mp/pat-fix-update-without-modifications branch December 1, 2022 16:42
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating a Token without any field modifications returns a Not Found
3 participants